package cn.jiyun.config;

import cn.jiyun.pojo.User;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Fay
 * @date 2022/6/20&16:30
 */
@Configuration //为配置类
public class UserConfig {
    @Bean // 交给spring容器来管理
    @ConfigurationProperties(prefix = "user")
    public User user(){
        User user = new User();
        return user;
    }
}
